using System;
using System.Collections.Generic;
using System.Text;

namespace Marlimer.Common.Entidades
{
    public class InfoNotaCreditoDet
    {
        public long ccod_doc;
        public int ccod_prod;
        public String descripcion;
        public int ncant;
        //public int ccod_unimed;
        public String cabre_unimed;
        //public String cdes_unimed;
        //public double npre_vtamin;
        public double npre_vta;
        //public double precioVenta;
        public double npor_dcto;
        //public double descuento;
        public double npor_igv;
        public int flg_noafecigv;

        public int ccod_unimed;

        public double precioVenta()
        {
            return npre_vta * ncant;
        }

        public double descuento()
        {
            return precioVenta() * (npor_dcto / 100);
        }

        public double Igv()
        {
            if (flg_noafecigv == 1)
            {
                return 0;
            }
            else
            {
                return (precioVenta() - descuento()) * npor_igv;
            }
        }

        public double npor_igvdet()
        {
            if (flg_noafecigv == 1)
            {
                return 0;
            }
            else
            {
                return npor_igv;
            }
        }

        public double valorVenta()
        {

            return precioVenta() - descuento() + Igv();
        }

    }
}
